#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include <stdio.h>
#include <unistd.h> // For sleep function

// Function to clear the console
void clearConsole() {
    printf("\033[H\033[J");
}

// Function to print the earth frame
void printEarth(int frame) {
    switch (frame) {
    case 0:
        printf("    ____\n");
        printf(" _.' :  `._\n");
        printf(".'`  :  '``.\n");
        printf(":  :  '    :\n");
        printf("'.  `--'  .'\n");
        printf("  `-....-'\n");
        break;
    case 1:
        printf("    ____\n");
        printf(" _.' :  `._\n");
        printf(".'`  :  '``.\n");
        printf(":  :  '    :\n");
        printf("'.  `--'  .'\n");
        printf("  `-....-'\n");
        break;
        // Add more frames if you want more detailed animation
    }
}

int main() {
    int frame = 0;
    while (1) {
        clearConsole();
        printEarth(frame);
        frame = (frame + 1) % 2; // Change this if you add more frames
        usleep(500000); // Sleep for 500 milliseconds
    }
    return 0;
}